package com.ck567.springbootnettyprotobufjava.handler.heartbeat;


import com.ck567.springbootnettyprotobufjava.utils.OptionType;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler;
import org.springframework.stereotype.Component;


/**
 * @description: 心跳请求处理
 */
//@ChannelHandler.Sharable
//@Component
//public class HeartBeatHandler implements MessageHandler<HeartBeatProto.HeartBeat> {
//
//    @Override
//    public void execute(Channel channel, HeartBeatProto.HeartBeat message) {
//        Message msg = new Message()
//                .setType(OptionType.HeartBeatsResp.getType())
//                .setMsg(HeartBeatProto.HeartBeat.newBuilder().build());
//        channel.writeAndFlush(msg);
//    }
//
//    @Override
//    public Short getType() {
//        return OptionType.HeartBeatsReq.getType();
//    }
//}
